<?php include PATH_TPL."/admin/tpl.header.phtml"?>
<style>
.align-left{
    text-align:left;
    padding-left:15px;
    padding-right:15px;
}
.align-center{
    text-align:center;

}
.red{
    color:red;
}
.bgcolor{
    background-color:#22262F;
}
</style>
<div class="main-container inner">
    <div class="main-content">
        <div class="container-fluid">
            <div class="row bt">
                <div class="col-lg-12 bg">
                    <ol class="breadcrumb">
                        <li class="active">
                            <i class="fa  fa-fw fa-reorder"></i>  问卷信息列表
                       </li>
                    </ol>
                </div>
            </div>
            <div class="row">
                <div class="col-md-4">
<!--                    <a class="btn btn-success" href="#">问卷信息</a> -->
                </div>
                <div class="col-md-8">
                    <form id="searchForm" method="post" action="/admin_wenjuan">
                        <div class="form-group col-md-6">
                            <div class="input-group date form_date" data-date="<?=date("Y-m-d",time())?>" data-date-format="yyyy-mm-dd" data-link-field="updated">
                                <input class="form-control" size="16" type="text" value="" readonly placeholder="输入处理日期搜索">
                                <span class="input-group-addon"><span class="glyphicon glyphicon-remove"></span></span>
                                <span class="input-group-addon"><span class="glyphicon glyphicon-th"></span></span>
                            </div>
                            <input type="hidden" id="updated" value="" name="updated" /><br/>
                        </div>

                        <div class="form-group input-group col-md-6 pull-righ">
                            <input type="text" placeholder="输入处理人名字或者反馈内容关键词搜索" name="key" class="form-control">
                            <span class="input-group-btn">
                              <button type="button" class="btn btn-default" id="search"><i class="fa fa-search"></i></button>
                            </span>
                        </div>
                    </form>
                </div>

                </div>
            </div>
        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a class="btn btn-success tooltips" href="/admin_wenjuan/download" data-original-title="Excel表导出"><i class="fa fa-cloud-download"></i></a>
            <div class="panel-body text-center">
                <table class="table table-hover" id="sample-table-1">
                    <thead>
                        <tr>
                            <td>编号</td>
                            <td>姓名</td>
                            <td>手机号</td>
                            <td>地址</td>
                            <td>时间</td>
                            <td>查看及处理</td>
                        </tr>
                    </thead>
                    <?   foreach($tDatas as $tRow){    ?>
                    <tr>
                        <td><?=$tRow['id']?></td>
                        <td><?=empty($tRow['name'])?"无":$tRow['name']?></td>
                        <td><?=$tRow['phone']?></td>
                        <td><?=$tRow['address']?></td>
                        <td><?=date('Y-m-d H:i:s',$tRow['created'])?></td>
<!--  onclick="show(<?/*=$tRow['id']*/?>)" -->
<td>
<a href="/admin_wenjuan/edit?id=<?=$tRow['id']?>" class="btn btn-blue btn-xs tooltips" data-placement="top" data-original-title="查看及处理"><i class="fa fa-edit"></i></a>
<a role="menuitem" class="btn btn-orange btn-xs tooltips demo_4" tabindex="-1" href="#" data-original-title="删除" data-placement="top" onclick="cg_confirm_del('/admin_wenjuan/del?id=<?=$tRow['id']?>','/admin_wenjuan')"><i class="fa fa-times"></i></a>
</td>
<!-- 这是模态框-->
<div class="modal fade" id="selectFieldModal<?=$tRow['id']?>" aria-hidden="true">
						<div class="modal-dialog  margin-top-50">
							<div class="modal-content">
								<div class="modal-header padding-top-30 align-center">
<div class="row"><label>详情</label></div>                                    
<div class="row align-left"><label >1、除本单位执业地点外，是否有其他执业地点</label></div>
                                    <div class="row">
<div class="col-sm-4"><input type="radio" <?=($tRow['file1']==1)?"checked":"" ?> disabled />是</div>
<div class="col-sm-4"><input type="radio"  <?=($tRow['file1']==2)?"checked":"" ?> disabled/>否</div></div>
                                
                                    <div class="row align-left"><label >2、是否愿意参加本公司的独立血液净化中心合作</label></div>
                                    <div class="row">
<div class="col-sm-4"><input type="radio" <?=($tRow['file2']==1)?"checked":"" ?> disabled />是</div>
<div class="col-sm-4"><input type="radio"  <?=($tRow['file2']==2)?"checked":"" ?> disabled/>否</div></div>

                                    <div class="row align-left"><label >3、愿意与本公司哪种关系合作(多选)</label></div>
                                    <div class="row">
<div class="col-sm-4"><input type="radio" <?=(stripos($tRow['file3'],'1')+1)?"checked":"" ?> disabled />中心托管</div>
<div class="col-sm-4"><input type="radio"  <?=stripos($tRow['file3'],'2')?"checked":"" ?> disabled/>实地授课</div>
<div class="col-sm-4"><input type="radio" <?=stripos($tRow['file3'],'3')?"checked":"" ?> disabled />中心托管</div>
<div class="col-sm-4"><input type="radio"  <?=stripos($tRow['file3'],'4')?"checked":"" ?> disabled/>实地授课</div>
<div class="col-sm-4"><input type="radio" <?=stripos($tRow['file3'],'5')?"checked":"" ?> disabled />中心托管</div>
<div class="col-sm-4"><input type="radio"  <?=stripos($tRow['file3'],'6')?"checked":"" ?> disabled/>合作共建</div></div>
                                    <? if($tRow['type']==2){ ?> 
                                <div class="row align-left"><label  >4、您所感兴趣的服务项目？(多选)</label></div>
                                <div class="row">
<div class="col-sm-4"><input type="radio" <?=(stripos($tRow['file4'],'1')+1)?"checked":"" ?> disabled />血透人才培训</div>
 <div class="col-sm-4"><input type="radio"  <?=stripos($tRow['file4'],'2')?"checked":"" ?> disabled/>血透室管理咨询服务</div>
 <div class="col-sm-4"><input type="radio" <?=stripos($tRow['file4'],'3')?"checked":"" ?> disabled />实现“一站式”多点执业</div>
 <div class="col-sm-4"><input type="radio"  <?=stripos($tRow['file4'],'4')?"checked":"" ?> disabled/>大数据研究平台</div>
 <div class="col-sm-4"><input type="radio" <?=stripos($tRow['file4'],'5')?"checked":"" ?> disabled />高峰专家论坛</div>
 <div class="col-sm-4"><input type="radio"  <?=stripos($tRow['file4'],'6')?"checked":"" ?> disabled/>医生个人平台打造</div></div>
                                    <? }?>
                                </div><!--modal-header-->
                            <div class="modal-body align-center">
<div class="row"><label>处理</label></div>
<form role="form" id="handleform" name="handleform" enctype="multipart/form-data">
    <input type="hidden" name="id" value=<?=$tRow['id'] ?>>
    <div class="form-group align-left">
        <label  class="red" for="dealName ">处理人姓名</label>
        <input type="text" class="form-control" name="dealName" id="dealName" placeholder="请输入姓名">
    </div>
    <div class="form-group align-left">
        <label  class="red" for="dealStatus">处理状态</label>
        <input type="radio" name="dealStatus" checked="true" value="0">未处理
        <input type="radio" name="dealStatus" value="1">已处理
    </div>
    <div class="form-group align-left">
        <label class="red" for="dealMsg">处理意见:</label>
        <textarea id="dealMsg" class="form-control" name="dealMsg" row="3" style="resize:none" placeholder="处理意见"></textarea>
    </div>
</form>

                            </div><!-- modal-body-->

							<div class="modal-footer align-center">
<button id="hsubmit" class="btn btn-default">提交处理结果</button>                                    
<a onclick="hide(<?=$tRow['id']?>)" href="##" class=" btn btn-default">取消并退出</a>
							</div>

                                        
                            </div><!--modal-content-->
						</div><!--modal-dialog-->
					</div><!--modal-fade-->
<!--上面是模态框-->
                                     </tr>
<?}?>
                </table>
                <?=$tShow?>
            </div>
        </div>
        <div class="subviews">
            <div class="subviews-container"></div>
        </div>
    </div>
    <!-- end: PAGE -->
</div>
<!-- end: MAIN CONTAINER -->
<script type="text/javascript" src="/plugins/datetimepicker/js/bootstrap-datetimepicker.js"></script>
<script type="text/javascript" src="/plugins/datetimepicker/js/locales/bootstrap-datetimepicker.zh-CN.js" charset="UTF-8"></script>
<script>
    function show(x){
    $('#selectFieldModal'+x).modal('show');

    }
    function hide(x){

    $('#selectFieldModal'+x).modal('hide');
    }
    $(function(){
     $('#hsubmit').click(function(){
            $.post("/admin_wenjuan/handle",$('#handleform').serialize(),function(obj){
            alert(obj.msg);    
            
            
        });
    

    })
       
    });

</script>
<script type="text/javascript">
$('.form_date').datetimepicker({
    language:  'zh-CN',
    weekStart: 1,
    todayBtn:  1,
    autoclose: 1,
    todayHighlight: 1,
    startView: 2,
    minView: 2,
    startDate:'2016-01-01',
    endDate:'2030-12-30',
    pickerPosition: "bottom-left",
    forceParse: 1
});
</script>

<script>
$('#search').click(function(){
    $('#searchForm').submit();
});
</script>
<?php include PATH_TPL."/admin/tpl.footer.phtml"?>
